package com.chunxuan.langquan.support.util;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;

public class HTMLFormat {

    public static String getNewContent(String htmltext) {

        try{

            Document doc = Jsoup.parse(htmltext);
            Elements elements = doc.getAllElements();
            for (Element element : elements) {

                element.attr("width", "100%").attr("height", "auto");

            }

            return doc.toString();


        }catch (Exception e){

            e.printStackTrace();

        }

        return null;

    }



}
